In various known content management systems, data may be stored with a timestamp to indicate a date and time when the data was last stored and/or created. A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. For example, image files may have a creation time tag with a timestamp value 2005-10-30 T 10:45 Coordinated Universal Time (UTC) stored with the image file.
Although there are various formats and systems for storing instances in time, Unix time is widely used with operating systems and file formats. Unix time is defined as the number of seconds that have elapsed since midnight UTC, not counting leap seconds. In order to determine the local time for a Unix timestamp, the time must be converted from UTC time using a time zone offset. The time zone offset is stored in a tz database (i.e., Olson database) and the time zone offset indicates an amount to add or subtract (e.g., +7 or −1) from the time for the particular time zone. Local rules for leap year and daylight seconds may or may not be retrieved, and adjustments may be made to the calculated local time to account for local rules where preferred. In some embodiments, local rules on daylight savings time and leap year may not be necessary to retrieve because client device 102 that captures the content item may account for the local rules with their system time and the creation time may be stored with a timestamp based off of the system time on client device. Similarly, content management system 100 may account for leap year and daylight savings time thereby not necessitating retrieval of local rules.
Applications that require frequent local time conversions also require numerous database accesses to retrieve all of the information necessary to make the conversions, and the resulting numerous accesses can present performance issues for the database. Furthermore, the continual need to perform conversions may require considerable processing time. Accordingly, there is a need for improved methods for date and time storage to reduce the impact on a database or system.